package user;

import Operation.*;

import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-07-04
 * Time: 22:52
 */
public class AdminUser extends User{

    public AdminUser(String name) {
        super(name);
        this.ioperations = new Ioperation[]{
                new ExitOperation(),
                new FindOperation(),
                new AddOperation(),
                new DelOperation(),
                new DisplayOperationOperation()
        };
    }

    public int menu(){
        System.out.println(name+"你好"+"欢迎来到图书小练习");
        System.out.println("请输入一下操作序号：");
        System.out.println("1.查找图书");
        System.out.println("2.添加图书");
        System.out.println("3.删除图书");
        System.out.println("4.显示图书");
        System.out.println("0.退出系统");
        Scanner scanner = new Scanner(System.in);
        int choice = scanner.nextInt();
        return choice;

    }
}
